package operation;

import book.Book;
import book.BookList;

/**
 * Created with IntelliJ IDEA.
 * Description:
 * User: lenovo
 * Date: 2024-06-04
 * Time: 22:03
 */
public class ShowBooks implements IBooks{
    @Override
    public void work(BookList booklist) {
       int count = booklist.getUsedSize();
       if(count == 0){
           System.out.println("图书馆没有图书！");
           return;
       }
        for (int i = 0; i < count; i++) {
            Book book = booklist.getBook(i);
            System.out.println(book);
        }
    }
}
